
package org.bridgen.lang.semantics.ast;
import java.util.*;


public class NEQExpr extends RelationalExpr implements Cloneable {
    public void flushCache() {
        super.flushCache();
    }
     @SuppressWarnings({"unchecked", "cast"})  public NEQExpr clone() throws CloneNotSupportedException {
        NEQExpr node = (NEQExpr)super.clone();
        node.in$Circle(false);
        node.is$Final(false);
    return node;
    }
     @SuppressWarnings({"unchecked", "cast"})  public NEQExpr copy() {
      try {
          NEQExpr node = (NEQExpr)clone();
          if(children != null) node.children = (ASTNode[])children.clone();
          return node;
      } catch (CloneNotSupportedException e) {
      }
      System.err.println("Error: Could not clone node of type " + getClass().getName() + "!");
      return null;
    }
     @SuppressWarnings({"unchecked", "cast"})  public NEQExpr fullCopy() {
        NEQExpr res = (NEQExpr)copy();
        for(int i = 0; i < getNumChildNoTransform(); i++) {
          ASTNode node = getChildNoTransform(i);
          if(node != null) node = node.fullCopy();
          res.setChild(node, i);
        }
        return res;
    }
    // Declared in TypeCodeGen.jrag at line 484


	public void generateCode(String indent, StringBuffer buf) {
		if (getLeft().type().equals("String") &&
			getRight().type().equals("String")) {
			buf.append("!");
			getLeft().generateCode(indent, buf);
			buf.append(".equals(");
			getRight().generateCode(indent, buf);
			buf.append(")");			
		} else {
			super.generateCode(indent, buf);
		}
	}

    // Declared in bridgit.ast at line 3
    // Declared in bridgit.ast line 98

    public NEQExpr() {
        super();


    }

    // Declared in bridgit.ast at line 10


    // Declared in bridgit.ast line 98
    public NEQExpr(Expr p0, Expr p1) {
        setChild(p0, 0);
        setChild(p1, 1);
    }

    // Declared in bridgit.ast at line 15


  protected int numChildren() {
    return 2;
  }

    // Declared in bridgit.ast at line 18

  public boolean mayHaveRewrite() { return false; }

    // Declared in bridgit.ast at line 2
    // Declared in bridgit.ast line 96
    public void setLeft(Expr node) {
        setChild(node, 0);
    }

    // Declared in bridgit.ast at line 5

    public Expr getLeft() {
        return (Expr)getChild(0);
    }

    // Declared in bridgit.ast at line 9


    public Expr getLeftNoTransform() {
        return (Expr)getChildNoTransform(0);
    }

    // Declared in bridgit.ast at line 2
    // Declared in bridgit.ast line 96
    public void setRight(Expr node) {
        setChild(node, 1);
    }

    // Declared in bridgit.ast at line 5

    public Expr getRight() {
        return (Expr)getChild(1);
    }

    // Declared in bridgit.ast at line 9


    public Expr getRightNoTransform() {
        return (Expr)getChildNoTransform(1);
    }

    // Declared in PrettyPrint.jrag at line 10
 @SuppressWarnings({"unchecked", "cast"})     public String operator() {
        String operator_value = operator_compute();
        return operator_value;
    }

    private String operator_compute() {  return "!=";  }

public ASTNode rewriteTo() {
    return super.rewriteTo();
}

}
